<script setup lang="ts">
import { useRoute, useRouter } from 'vue-router'

const route = useRoute();
const router = useRouter();

function handleSelect(s) {
    router.push({
        name: s
    })
}
</script>

<template>
<div class="side-main">

    <el-menu
        active-text-color="#ffd04b"
        background-color="#545c64"
        class="el-menu-vertical-demo"
        default-active="home"
        text-color="#fff"
        @select="handleSelect">
        <el-menu-item index="home">
            <el-icon><icon-menu /></el-icon>
            <span>首页</span>
        </el-menu-item>
        <el-menu-item index="user">
            <el-icon><icon-menu /></el-icon>
            <span>用户</span>
        </el-menu-item>
        
    </el-menu>
    </div>
</template>

<style scoped>
.side-main {
    height: 100%;
    width: 240px;
    background-color: #545c64;
    /* overflow-y: scroll; */
}
.el-menu {
    border-right: none;
}
</style>